Bluetooth is a radio technology that supports communication between devices over a short distance. Currently, there are more products having Bluetooth functions. In the prior art, when establishing a Bluetooth connection between two devices, a user first needs to manually enable a Bluetooth function of a device. For example, the user needs to manually enter a Bluetooth setting interface of a mobile phone, and enable a Bluetooth function of the mobile phone in the Bluetooth setting interface. If the device is a slave device in Bluetooth pairing, the user needs to manually set the Bluetooth function of the slave device as visible, so that the slave device can be scanned by a master device in Bluetooth pairing. When the user establishes a connection between the two devices, the user needs to input a pairing password on the two devices separately. After the password is input, the two devices authenticate each other and complete Bluetooth pairing.
A disadvantage of Bluetooth pairing used in the prior art is as follows: In a conventional Bluetooth pairing process, the user needs to perform settings for a plurality of times, and to complete pairing, the two devices need to learn information in advance, such as a Bluetooth name or a Media Access Control MAC address of a peer device. Obviously, efficiency of a Bluetooth pairing method provided by the prior art is low. In addition, when the user performs operations manually, a misoperation easily occurs, and even a wrong device is connected. Moreover, when establishing a connection every time, the user needs to input a pairing password, a pairing operation process is complex, and accuracy and usability are low.